package org.abbett.eskine.controller;

import org.abbett.eskine.entity.Page;
import org.abbett.eskine.service.EditEditPageSaveOutcome;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

/**
 * Glue code to bind Add or Edit Page Service with the view framework (Seam)
 * 
  * Create a new wiki page, or edit an existing one.
  *
 * Automatically generated by clickframes
 * 
 * @author Vineet Manohar
 */
@Name("editController")
@Scope(ScopeType.CONVERSATION)
public class EditController extends GeneratedEditController {
    @SuppressWarnings("unused")
    private final Log logger = LogFactory.getLog(getClass());


 
    /**
     * Save
     *
      * Automatically generated by clickframes
     */
    @Override
    public EditEditPageSaveOutcome editPageSave() {
        logger.warn("Method not implemented yet.  Please implement EditService.editPageSave()");
    
        editPageSaveResponse = editService.editPageSave(editPageForm());

        return editPageSaveResponse.getOutcome();
    }
    
    @Override
    protected Page loadPage() {
    	if (getId() != null) {
    		return super.loadPage();
    	}
    	
    	return pageDao.newInstance();
    };
    

    private static final long serialVersionUID = 1L;
}// clickframes::version=2639712248::clickframes